home *** CD-ROM | disk | FTP | other *** search
- procedure MINMAX (var Surfmin, Surfmax: surfaces; Nsurf: integer);
- { Calculate the minimum and maximum Ztran coordinates of each surface }
-
- var Surf: integer; { surface # }
- Vert: integer; { vertex # }
- Zval: real; { Z-coord of node }
-
- begin
- {$ifdef BIGMEM}
- with ptrf^ do with ptrh^ do
- begin
- {$endif}
- for Surf := 1 to Nsurf do begin
- Surfmin[Surf] := 9999.0;
- Surfmax[Surf] := -9999.0;
- for Vert := 1 to Nvert[Surf] do begin
- Zval := Ztran[Konnec (Surf, Vert)];
- if (Zval < Surfmin[Surf]) then
- Surfmin[Surf] := Zval;
- if (Zval > Surfmax[Surf]) then
- Surfmax[Surf] := Zval;
- end;
- end;
- {$ifdef BIGMEM}
- end; {with}
- {$endif}
- end; { procedure MINMAX }